USE [w1361192_aspnetdb]
GO

----------------------------------------------------------------------------------------------------------------------------------

INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion ) VALUES ('common', '1', 1)
INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion ) VALUES ('health monitoring', '1', 1)
INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion ) VALUES ('membership', '1', 1)
INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion ) VALUES ('personalization', '1', 1)
INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion ) VALUES ('profile', '1', 1)
INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion ) VALUES ('role manager', '1', 1)


----------------------------------------------------------------------------------------------------------------------------------

--DECLARE @UserName NVarChar(30)
--DECLARE @LoweredUserName NVarChar(30)
--DECLARE @Password NVarChar(30)
DECLARE @ApplicationName NVarChar(255)
--DECLARE @PasswordSalt NVarChar(128)

SET @ApplicationName = '/slsyj'
--SET @UserName = 'admin'
--SET @LoweredUserName = 'admin'
--SET @Password = 'admin123'



INSERT INTO aspnet_Applications
	(ApplicationName, LoweredApplicationName)
VALUES
	(@ApplicationName, @ApplicationName)


DECLARE @ApplicationId uniqueidentifier
SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE ApplicationName = @ApplicationName

/*
INSERT INTO aspnet_Users
	(ApplicationId, UserName, LoweredUserName, IsAnonymous, LastActivityDate)
VALUES	
	(@ApplicationId, @UserName, @LoweredUserName, 0, GETDATE())

DECLARE @UserID uniqueidentifier
SELECT @UserID = UserID FROM aspnet_Users WHERE ApplicationId = @ApplicationId

--SET @PasswordSalt = (SELECT 1 PasswordSalt FROM aspnet_Membership WHERE UserID IN (SELECT UserID FROM aspnet_Users u, aspnet_Applications a WHERE u.UserName=@UserName and a.ApplicationName = @Application AND u.ApplicationId = a.ApplicationId))
SET @PasswordSalt = (SELECT 1 PasswordSalt FROM	aspnet_Membership WHERE	UserID = @UserID)
--SELECT @PasswordSalt

EXEC dbo.aspnet_Membership_ResetPassword @ApplicationName, @UserName, @Password, 10, 10, @PasswordSalt, -5
*/








		

		
		
--select * from aspnet_Users
--select * from aspnet_Membership
		
		
		